There is actually a scripture somewhere in one of the NT books that says to "reprove sinners in the presence of onlookers". What does that mean? Does it mean walking up to a stage and announcing "so and so has been reproved"? Is merely announcing that someone has been reproved, the same thing as reproving them in the presence of onlookers?
By way of illustration: If a Mob boss tells one of his henchmen: 'Shoot Lenny publicly', are the police also shooting Lenny publicly, when they later announce at a press conference: 'Lenny has been shot'?
It's pretty obvious that "reprove sinners in the presence of onlookers" means that gross sinners are not to be counseled and tried in secret but in the presence of others. This is what the passage in Matthew is alluding to when it says to take the sin to the congregation and if the sinner does not listen to the congregation then let him be regarded as a tax collector.